package day14_21.day15;

import java.util.Scanner;

public class Main01 {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while (scn.hasNext()){
            int count = 0;
            int numTen = scn.nextInt();
            String numTwo = Integer.toBinaryString(numTen);
            for (int i = 0; i < numTwo.length(); i++) {
                if (numTwo.charAt(i) == '1'){
                    count ++;
                }
            }
            System.out.println(count);
        }
    }
}
